package sk.tuke.constraintbuilder.model;

public enum Context {
	
	FIELD, METHOD, PACKAGE, PARAMETER, TYPE, CONSTRUCTOR, UNDEFINED;
	
	public String value(){
		return name();
	}

	public static String[] getValues(){
		return new String [] {"FIELD", "METHOD", "PACKAGE", "PARAMETER", "TYPE", "CONSTRUCTOR", "UNDEFINED"};
	}
	
	
	public static Context getContext(String context){
		switch(context){
			case "FIELD": return Context.FIELD;
			case "METHOD": return Context.METHOD;
			case "PACKAGE": return Context.PACKAGE;
			case "PARAMETER": return Context.PARAMETER;
			case "TYPE": return Context.TYPE;
			case "CONSTRUCTOR": return Context.CONSTRUCTOR;
		}
		return Context.UNDEFINED;
	}
}
